const path = require('path');
const webpack = require('webpack');

module.exports = {
  resolve: {
    extensions: ['.js', '.jsx']
  },
  entry: {
    vendor: ['antd', 'lodash', 'react', 'react-dom', 'react-router', 'react-router-dom']
  },
  output: {
    path: path.join(__dirname, 'vendor'),
    filename: '[name].dll.js',
    library: '[name]_[hash]'
  },
  plugins: [
    new webpack.DllPlugin({
      path: path.join(__dirname, 'vendor', '[name]-manifest.json'),
      name: '[name]_[hash]'
    })
  ]
};
